package org.canx.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import org.canx.domain.User;
/**
 * 
 * @class description :
 * 
 * 
 * @author Andrew Qian
 * @time 2017年7月17日 下午2:22:12
 */
public interface UserRepository extends PagingAndSortingRepository<User,String>{
	//用户名密码查找
	User findByUserGidAndUserPassword(String userGid , String userPassword);
	//二维码查找
	User findByUserGid(String userGid);
	
	//管理员搜索
	@Query("select u from User u where concat(u.userGid,u.userName,u.userRole) like %?1% and u.userStatus=1")  
	List <User> findUserlist(String queryString);
}
